package org.example;

public class Soldier extends Role{


    String name;
    private int hurt;// 魔法等级
    public int attack() {
        return hurt;
    }

    public Soldier() {
    }

    public Soldier(String name,int hurt) {
        this.name=name;
        this.hurt = hurt;
    }


    @Override
    public String toString() {
        return "Soldier{" +
                "name='" + name + '\'' +
                ", hurt=" + hurt +
                '}';
    }

    public int getHurt() {
        return hurt;
    }

    public void setHurt(int hurt) {
        this.hurt = hurt;
    }


}
